package com.fast.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fast.server.config.session.SessionWebUserConfig;
import com.fast.server.entity.vo.SysUser;
import com.fast.server.entity.pages.UserPageParams;
import com.fast.server.entity.responseVO.RespBean;

import java.util.List;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author ziyuancheng
 * @since 2024-05-05
 */
public interface ISysUserService extends IService<SysUser> {

    SysUser getUserById(String userId);

    RespBean updateUserById(String userId, SysUser sysUser);

    RespBean deleteUserById(String userId);

    SysUser getUserByEmail(String email);

    RespBean updateUserByEmail(String email, SysUser sysUser);

    RespBean deleteUserByEmail(String email);

    SysUser getUserByQQOpenId(String qqOpenId);

    RespBean updateUserByQQOpenId(String qqOpenId, SysUser sysUser);

    RespBean deleteUserByQQOpenId(String qqOpenId);

    SysUser getUserByWechatId(String wechatId);

    RespBean updateUserByWechatId(String wechatId, SysUser sysUser);

    RespBean deleteUserByWechatId(String wechatId);

    RespBean getAllUsersByPage(UserPageParams pageParams);

    RespBean addUser(SysUser user);

    RespBean addUsers(List<SysUser> userList);

    RespBean getUserAvatar(String userId);

    RespBean getUserSpace(String userId);

    RespBean updateUserAvatar(String userId, String avatarUrl);

    RespBean qqLogin(String qqOpenId);

    RespBean qqLoginCallback(String code);

    void register(String email, String nickName, String password, String emailCode);

    SessionWebUserConfig login(String email, String password);

    void resetPwd(String email, String password, String emailCode);
}
